<?php /* Smarty version 2.6.14, created on 2015-02-12 09:49:11
         compiled from dataretention.show.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<link rel="stylesheet" type="text/css" href="<?php echo @BASEURI; ?>
public/css/ui.datepicker.css"/>
<script language="javascript" src="<?php echo @BASEURI; ?>
public/js/ui.datetimepicker.js"></script>
<script language="javascript" src="<?php echo @BASEURI; ?>
public/js/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo @BASEURI; ?>
public/css/jquery.autocomplete.css"/>
<table border="0" class="search" cellspacing="0" id="search">
    <tr>
        <td>&nbsp;</td>
        <td>
            <?php echo $this->_tpl_vars['systemLang']['selectGame']; ?>
:
            <input type="text" name="country" id="selectGame" value="<?php echo $this->_tpl_vars['games'][$this->_tpl_vars['search']['game_id']]; ?>
" />
            <input type="text" name="s[game_id]" id="gamess" value="" style="display: none"/>|
            <?php echo $this->_tpl_vars['systemLang']['selectStarTime']; ?>
:
            <input class="text" style="width:120px" type="text" name="s[date_stat]" id="cctime_s" readonly value="<?php echo $this->_tpl_vars['search']['date_stat']; ?>
"/>

            <input type="submit" name="submit" value="<?php echo $this->_tpl_vars['systemLang']['submit']; ?>
" class="button" />
        </td>
    </tr>
</table>
<table width="100%" border="0" class="adminlist" cellspacing="0">

    <thead>
    <tr>
        <?php if ($this->_tpl_vars['search']['game_id']): ?>
        <th><?php echo $this->_tpl_vars['systemLang']['date']; ?>
</th>
        <?php else: ?>
        <th><?php echo $this->_tpl_vars['systemLang']['gameName']; ?>
</th>
        <?php endif; ?>
        <th><?php echo $this->_tpl_vars['systemLang']['addUser']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['oneDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['twoDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['threeDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['fourDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['fiveDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['sixDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['sevenDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['fifteenDay']; ?>
</th>
        <th><?php echo $this->_tpl_vars['systemLang']['thirtyDay']; ?>
</th>
    </tr>
    </thead>
    <tbody>
    <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['info']):
?>
    <tr class="row0">
        <?php if ($this->_tpl_vars['search']['game_id']): ?>
        <td><?php echo $this->_tpl_vars['info']['date']; ?>
</td>
        <?php else: ?>
        <td><a href="<?php echo $this->_tpl_vars['formAction']; ?>
/game_id/<?php echo $this->_tpl_vars['info']['gameid']; ?>
"><?php echo $this->_tpl_vars['games'][$this->_tpl_vars['info']['gameid']]; ?>
</a></td>
        <?php endif; ?>
        <td><?php echo $this->_tpl_vars['info']['addUser']; ?>
</td>
        <td <?php if ($this->_tpl_vars['info']['oneDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['oneDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['twoDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['twoDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['threeDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['threeDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['fourDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['fourDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['fiveDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['fiveDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['sixDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['sixDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['sevenDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['sevenDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['fifteenDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['fifteenDay']; ?>
%</td>
        <td <?php if ($this->_tpl_vars['info']['thirtyDay'] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['info']['thirtyDay']; ?>
%</td>
    </tr>
    <?php endforeach; endif; unset($_from); ?>
    </tbody>
    <tfoot>
    <tr>
        <td></td>
        <!--<td colspan="10" style="text-align:center"><?php echo $this->_tpl_vars['page']; ?>
</td>-->
    </tr>
    </tfoot>
</table>
</form>
<script language="javascript">

    $("#selectGame").autocomplete("/game_manager/search",{
        max: 10,//显示数据条数
        minChars:1, //在触发autoComplete前用户至少需要输入的字符数 默认为0 在输入框内双击或者删除输入框内内容时显示列表
        matchCase:false,
        matchContains:true,
        //matchContains: "word",//只要包含输入字符就会显示提示
        autoFill:false,//自动填充输入框
        scroll:false,//不显示滚动条
        parse: function(data){
            var rows = [];
            var d = eval(data);
            for(var i=0; i<d.length; i++){
                rows[rows.length] = {
                    data:d[i], //每条数据对象
                    value:d[i].name, //与输入的值比较的数据
                    result:d[i].name  //选中的实际数据
                };
            }
            return rows;
        },
        formatItem: function(row, i, max) {
            console.log(row);
            return   "<span class='ac_name'>"+row.name + "</span>";
        },
        formatMatch: function(row, i, max) {
            return row.name + " " + row.game_id;
        },
        formatResult: function(row) {
            return row.name;
        }
    }).result(function(event, row, formatted) {
        $("#gamess").val(row.game_id);
    });

    $('#cctime_s').datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"",maxDate:"+1d"});
    $('#cctime_e').datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"",maxDate:"+1d"});
</script>